package com.runa.rccprotocol.flightControl;

import lombok.Data;

/**
 * 2024/9/6 10:05
 * zhangYB
 */
@Data
public class Response {


    private Integer code;

    private String message;

    public Response() {
    }

    public Response(Integer code) {
        this.code = code;
    }

    public Response(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Boolean isSuccess() {
        return null != code && code == 200;
    }

    public static Response fail() {
        return new Response(500);
    }

}
